#基础镜像
#FROM openjdk:8-jre-alpine
FROM adoptopenjdk/openjdk8-openj9:alpine-slim

COPY docker/wondershaper1.4.1/ /wondershaper1.4.1/

#安装tc、bash
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone \
    && sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk update \
    && apk add iproute2 && apk add --no-cache bash \
    && chmod +x /wondershaper1.4.1/* && dos2unix /wondershaper1.4.1/*

#拷贝发布包
COPY target/*-jar-with-dependencies.jar  /app.jar

#启动脚本
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-Xshareclasses", "-Xquickstart", "-jar", "/app.jar"]